#ifndef RASYNCRUNNER_H
#define RASYNCRUNNER_H

#include <QThread>



template<class A, class B>
class RAsyncRunner : public QThread
{
    Q_OBJECT
public:
    typedef bool (*Callback)(A para1, B para2);
    explicit RAsyncRunner(Callback callbackFunc,
                          A& para1, B& para2,
                          QObject *parent = 0);
    bool result() const;

protected:
    void run();

signals:

public slots:

private:
    Callback m_cb;
    A& m_para1;
    B& m_para2;
    bool m_result;
};

#endif // RASYNCRUNNER_H
